Optimal. Leaf size=53 \[ \frac{(a-b) \tan ^2(e+f x)}{2 f}+\frac{(a-b) \log (\cos (e+f x))}{f}+\frac{b \tan ^4(e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0387884, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3631, 3473, 3475} \[ \frac{(a-b) \tan ^2(e+f x)}{2 f}+\frac{(a-b) \log (\cos (e+f x))}{f}+\frac{b \tan ^4(e+f x)}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3631
Rule 3473
Rule 3475
Rubi steps
\begin{align*} \int \tan ^3(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=\frac{b \tan ^4(e+f x)}{4 f}+(a-b) \int \tan ^3(e+f x) \, dx\\ &=\frac{(a-b) \tan ^2(e+f x)}{2 f}+\frac{b \tan ^4(e+f x)}{4 f}+(-a+b) \int \tan (e+f x) \, dx\\ &=\frac{(a-b) \log (\cos (e+f x))}{f}+\frac{(a-b) \tan ^2(e+f x)}{2 f}+\frac{b \tan ^4(e+f x)}{4 f}\\ \end{align*}
Mathematica [A] time = 0.163594, size = 65, normalized size = 1.23 \[ \frac{a \left (\tan ^2(e+f x)+2 \log (\cos (e+f x))\right )}{2 f}-\frac{b \left (-\tan ^4(e+f x)+2 \tan ^2(e+f x)+4 \log (\cos (e+f x))\right )}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 78, normalized size = 1.5 \begin{align*}{\frac{b \left ( \tan \left ( fx+e \right ) \right ) ^{4}}{4\,f}}+{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}a}{2\,f}}-{\frac{b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{2\,f}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) a}{2\,f}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) b}{2\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.14193, size = 95, normalized size = 1.79 \begin{align*} \frac{2 \,{\left (a - b\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac{2 \,{\left (a - 2 \, b\right )} \sin \left (f x + e\right )^{2} - 2 \, a + 3 \, b}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.10426, size = 126, normalized size = 2.38 \begin{align*} \frac{b \tan \left (f x + e\right )^{4} + 2 \,{\left (a - b\right )} \tan \left (f x + e\right )^{2} + 2 \,{\left (a - b\right )} \log \left (\frac{1}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.479477, size = 88, normalized size = 1.66 \begin{align*} \begin{cases} - \frac{a \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac{b \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{b \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac{b \tan ^{2}{\left (e + f x \right )}}{2 f} & \text{for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \tan ^{3}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.99459, size = 1446, normalized size = 27.28 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]